﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="style_add.aspx.cs" Inherits="manage_channel_style_add" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link href="../../sysImages/<%Response.Write(NetCMS.Config.UIConfig.CssPath());%>/css/css.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../configuration/js/Public.js"></script>
<script type="text/javascript" src="../../editor/fckeditor.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <table id="top1" width="100%"  border="0" cellpadding="0" cellspacing="0" class="toptable">
        <tr>
          <td height="1" colspan="2"></td>
        </tr>
        <tr>
          <td width="57%" class="sysmain_navi" style="padding-left:14px;">增加/修改样式管理</td>
          <td width="43%">位置导航：<a href="../main.aspx" class="list_link" target="sys_main">首页</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="list.aspx" class="list_link" target="sys_main">频道列表</a><img alt="" src="../../sysImages/folder/navidot.gif" border="0" /><a href="style_list.aspx?ChID=<%Response.Write(Request.QueryString["ChID"]); %>" class="list_link" target="sys_main">样式列表</a> </td>
        </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
      <tr class="TR_BG_list">
        <td style="text-align:right;width:20%">栏目</td>
        <td >
        <asp:DropDownList ID="gClassID" runat="server">
        </asp:DropDownList>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="gClassID" Display="Dynamic" ErrorMessage="<span class='reshow'>请选择栏目</span>"></asp:RequiredFieldValidator>
       </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">样式名称</td>
        <td >
            <asp:TextBox ID="styleName" MaxLength="50" Width="300px" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="f_styleName" runat="server" ControlToValidate="styleName" Display="Dynamic" ErrorMessage="<span class='reshow'>请填写样式名称</span>"></asp:RequiredFieldValidator>
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">选择样式</td>
        <td >
            <asp:DropDownList ID="ChannelStyle" runat="server" onchange="getValue(this.value);">
            <asp:ListItem Value="">01.选择字段</asp:ListItem>
            </asp:DropDownList>
            <label id="style_base" runat="server" />
            <label id="style_class" runat="server" />
            <label id="style_special" runat="server" />                 
        </td>
      </tr>
      
      <tr class="TR_BG_list">
        <td style="text-align:right;">内容</td>
        <td style="height:200px;">
<%--        <script type="text/javascript" language="JavaScript">
            window.onload = function()
	        {
	        var sBasePath = "../../editor/"
            var oFCKeditor = new FCKeditor('GstyleContent') ;
            oFCKeditor.BasePath	= sBasePath ;
            oFCKeditor.ToolbarSet = 'NT_style';
            oFCKeditor.EnableXHTML=true;
            oFCKeditor.Width = '100%' ;
            oFCKeditor.Height = '300px' ;	
            oFCKeditor.ReplaceTextarea() ;
            }
        </script>--%>
		<textarea rows="10" cols="99" name="GstyleContent" style="padding:5px;font-size:14px;line-height:20px;" id="GstyleContent" runat="server" ></textarea>
        </td>
      </tr>
      
      <tr class="TR_BG_list">
        <td style="text-align:right;">锁定</td>
        <td >
            <asp:CheckBox ID="islock" runat="server" />
        </td>
      </tr>
      <tr class="TR_BG_list">
        <td style="text-align:right;">描述</td>
        <td >
            <asp:TextBox ID="styleDescript" MaxLength="200" Width="300px" runat="server"></asp:TextBox>
        </td>
      </tr>
        
      <tr class="TR_BG_list">
        <td style="text-align:right;"></td>
        <td >
         <asp:Button ID="Button1" runat="server" Text="保存样式" OnClick="Button1_Click" />
        </td>
      </tr>
      </table> 
      
    <br />
    <br />
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="copyright_bg" style="height: 76px">
       <tr>
         <td align="center"><label id="copyright" runat="server" /></td>
       </tr>
    </table>
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
function getValue(value)
{
   document.all.GstyleContent.focus();
   var tarobj = document.selection.createRange();
   tarobj.text = value;
//    var oEditor = FCKeditorAPI.GetInstance("GstyleContent");
//    if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
//    {
//       oEditor.InsertHtml(value);
//    }else
//    {
//        return false;
//    }
} 
</script>